package com.group.Service.Impl;

import com.group.DAO.OwnerDAO;
import com.group.Enity.Owner;
import com.group.Service.OwnerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OwnerServiceImpl implements OwnerService {

    @Autowired
    private OwnerDAO ownerDAO;

    public List<Owner> getOwners(String identity,String tel){
        return ownerDAO.getOwners(identity,tel);
    }

    @Override
    public void add(Owner owner) {
        ownerDAO.add(owner);
    }

    @Override
    public void update(Owner owner) {
        ownerDAO.update(owner);
    }

    @Override
    public void delete(int id) {
        ownerDAO.delete(id);
    }
}
